<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="../../js/common/js/jquery-3.4.1.js" type="text/javascript">
			
		
		<script type="text/javascript">
			$(function()
			{
				//将苹果替换成菠萝
          		var apple=$(".first").clone();
				$(".third").replaceWith(apple)
            	//将菠萝替换成苹果
           		var apple=$(".third").clone();
				$(".first").replaceWith(apple)
            	//将苹果替换成菠萝
            	var apple=$(".first").clone();
				$(".third").replaceWith(apple)
			})
		</script>
		
            
	</head>
	<body>
		<h3>例子</h3>
    <div class="container">
        <div class="first">苹果</div>
        <div class="second">橘子</div>
        <div class="third">菠萝</div>
    </div>
	</body>
</html>
